﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Noke.Common.Exceptions;

namespace Noke.Common.DatabaseAccess
{
    public abstract class DatabaseAccess
    {
        #region private properties

        private string prefix = "@";

        #endregion


        #region Commands

        #region NonQuery

        public void Insert(object model)
        {

        }
        public void Insert(object model, out int newId)
        {
            newId = 0;

        }
        public void Insert(object model, out long newId)
        {
            newId = 0;

        }

        public int Update(object model)
        {
            int RowsAffected = 0;
            try
            {
            }
            catch (Exception ex)
            {
                RowsAffected = -1;
                new ActivateException(ex);
            }
            return RowsAffected;
        }
        public int Update(object model, List<string> updateColumns)
        {
            int RowsAffected = 0;
            try
            {

            }
            catch (Exception ex)
            {
                RowsAffected = -1;
                new ActivateException(ex);
            }
            return RowsAffected;
        }

        #endregion


        #endregion
    }


}
